/*	******************************************
	File:		HaarTracker.h
	Author:		Adnan Srna, Peter Kober, Ivo Havranek
	Purpose:	AugmentedReality 2
	(up)Date:	March/April 2010
	Descr.:		class for face tracking 
	Origin:		Salzburg University of Applied Science
	******************************************	*/

#pragma once

#include "ofMain.h"
#include "ofxCvHaarTracker.h"

#define WIDTH				320
#define HEIGHT				240
#define SAMPLE_WIDTH		320
#define SAMPLE_HEIGHT		240

class CHaar{
	public:
		void setup();
		void update();
		void draw();

		ofPoint	_pos;
		float amplitude;

	private:
		ofVideoGrabber			vidGrabber;
	        
		ofxCvColorImage			colorLargeImage;
		ofxCvColorImage			colorSmallImage;
		ofxCvGrayscaleImage		grayLargeImage;
		ofxCvGrayscaleImage 	graySmallImage;

		ofxCvHaarFinder			haarFinder;
		ofxCvHaarTracker		haarTracker;

		float					sourceToSampleScale;
		float					sampleToSourceScale;
		float					x, y, w, h;
};
